/*
 * @Author: Author && Email
 * @Date: 2024-04-14 17:11:21
 * @LastEditors: Author && Email
 * @LastEditTime: 2024-04-14 17:15:43
 * @FilePath: \MDK-ARMd:\WorkSpace\PRJ\MFBT\sw\mfbt\User\bsp\bsp_io.c
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
 */
#include "bsp_io.h"

void bsp_ds18b20_output(void)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  
  GPIO_InitStruct.Pin = IO_DS18B20_PIN;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_PULLUP;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  HAL_GPIO_Init(IO_DS18B20_PORT, &GPIO_InitStruct);
}

void bsp_ds18b20_input(void)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  
  GPIO_InitStruct.Pin = IO_DS18B20_PIN;
  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  GPIO_InitStruct.Pull = GPIO_PULLUP;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  HAL_GPIO_Init(IO_DS18B20_PORT, &GPIO_InitStruct);
}
